//
// Created by wkm on 2023-12-04.
//

#ifndef MYSYSTEMCLEARNING_ENCODER_H
#define MYSYSTEMCLEARNING_ENCODER_H

#include "systemc.h"

const int IN_SIZE = 8;
const int OUT_SIZE = 3;

SC_MODULE(encoder) {
    sc_in<sc_uint<IN_SIZE> > data;
    sc_out<sc_lv<OUT_SIZE> > yout;

    void prc_encoder();

    SC_CTOR(encoder) {
        SC_METHOD(prc_encoder);
        sensitive << data;
    }
};

#endif //MYSYSTEMCLEARNING_ENCODER_H
